package ru.evga.inse.server.gwt.user.client.menu.realty;

import ru.evga.gwt.lib.common.client.actitvity.AbstractEntityListActivity;
import ru.evga.gwt.lib.common.client.ui.dialog.ConfirmDialog;
import ru.evga.inse.server.gwt.common.client.domain.dict.CityDto;
import ru.evga.inse.server.gwt.user.client.IUserAppFactory;

import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.user.client.Window;


public class RealtyContentActivity
    extends AbstractEntityListActivity<CityDto>
{
    private final IUserAppFactory m_factory;

    public RealtyContentActivity(IUserAppFactory factory)
    {
        super(factory.getMenuFactory().getRealtyContentView());
        m_factory = factory;
    }

    public void onEditClicked(CityDto item)
    {
        //        CityFormDialog dialog = new CityFormDialog(m_factory.getApplicationRequestFactory().cityRequest(), item);
        //        dialog.setTitle("Edit City");
        //        dialog.open();
    }

    public void onShowDetails(CityDto record)
    {
        Window.alert("OnShow");
        //        Window.alert(record.toString());
    }

    public void onCreateClicked()
    {
        Window.alert("OnCreate");
        //       CityFormDialog dialog = new CityFormDialog(m_factory.getApplicationRequestFactory().cityRequest(), null);
        //       dialog.setTitle("New City");
        //       dialog.open();
    }

    public void onSelected(CityDto item)
    {
        // TODO Auto-generated method stub
    }

    @Override
    protected String getEntityName()
    {
        return "city";
    }
    
    @Override
    protected JavaScriptObject getEntityRangeFilter()
    {
        // TODO Auto-generated method stub
        return null;
    }
}
